using NHibernate;
using NHibernate.Cfg;
using Rhino.Commons;

namespace WineCellar.Security.Setup
{
    public class CaptureConfiguration : INHibernateInitializationAware
    {
        public static Configuration cfg;

        #region INHibernateInitializationAware Members

        public void BeforeInitialization()
        {
        }

        #endregion

        public void Configured(Configuration cfg)
        {
            cfg.SetProperty("hibernate.search.default.directory_provider",
                                           "NHibernate.Search.Store.FSDirectoryProvider, NHibernate.Search");
            cfg.SetProperty("hibernate.search.default.indexBase","Index");
        }

        public void Initialized(Configuration cfg, ISessionFactory sessionFactory)
        {
            CaptureConfiguration.cfg = cfg;
        }
    }
}